package cn.gson.springmvc.model.pojos;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Objects;

@Entity
public class Inspectionitems {
    private int projectId;
    private String projectName;
    private String inspectMes;

    @Id
    @Column(name = "project_id", nullable = false)
    public int getProjectId() {
        return projectId;
    }

    public void setProjectId(int projectId) {
        this.projectId = projectId;
    }

    @Basic
    @Column(name = "project_name", nullable = true, length = 10)
    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    @Basic
    @Column(name = "inspect_mes", nullable = true, length = 50)
    public String getInspectMes() {
        return inspectMes;
    }

    public void setInspectMes(String inspectMes) {
        this.inspectMes = inspectMes;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Inspectionitems that = (Inspectionitems) o;
        return projectId == that.projectId &&
                Objects.equals(projectName, that.projectName) &&
                Objects.equals(inspectMes, that.inspectMes);
    }

    @Override
    public int hashCode() {
        return Objects.hash(projectId, projectName, inspectMes);
    }
}
